<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="${contextPath}/admin/stylesheets/common.css?v=${sversion}" />
    <link rel="stylesheet" href="${contextPath}/admin/stylesheets/table.css?v=${sversion}" />
	<script type="text/javascript" src="${contextPath}/ext/jquery/jquery-1.8.1.min.js"></script>
    <script type="text/javascript" src="${contextPath}/ext/layer/layer.min.js"></script>
    <script type="text/javascript" src="${contextPath}/ext/laydate/laydate.js"></script>
    <script type="text/javascript" src="${contextPath}/admin/ext/jquery/selectbox.js"></script>
    <script type="text/javascript" src="${contextPath}/admin/ext/zw/grid.js?v=${sversion}"></script>
    <script type="text/javascript" src="${contextPath}/admin/javascripts/tool.js?v=${sversion}"></script>
	<script type="text/javascript" src="${contextPath}/admin/javascripts/zcommon.js?v=${sversion}" basepath="${contextPath}" baseinit="ajaxCheckLogin"></script>
</head>
<body>
	<div class="place">
        <span class="label-span">位置：</span>
        <span>系统管理 - 操作日志</span>
    </div>
    <div class="body-warp">
        <div class="panel filter-block">
            <form class="form-inline">
                <div class="form-group">
                    用户姓名：<input id="searchUserName" class="form-control" type="text" />
                </div>
                <div class="form-group">
                    组织名称：<input id="searchDeptName" class="form-control" type="text" />
                </div>
                <div class="form-group">
                    操作：<input id="searchOpers" class="form-control" type="text" />
                </div>
                <div class="form-group">
                    操作内容：<input id="searchDescr" class="form-control" type="text" />
                </div>
                
                <div class="form-group">
                    IP地址：<input id="searchIp" class="form-control" type="text" />
                </div>
                <div class="form-group">
                    <a href="javascript:void(0);" class="btn" id="search-btn"><i class="iconfont">&#xe61b;</i>搜索</a>
                </div>
            </form>
        </div>
        <table class="table" id="table"></table>
    </div>
<script>
    var grid = {};
    $(function() {
        grid = $('#table').grid({
            store: {
				url: '${contextPath}/log/list.ajax'
            },
            tool: {
                pagingBar: true
            },
            columns: [
            {
                title: '用户姓名',
                dataIndex: 'userName'
            },{
                title: '组织名称',
                dataIndex: 'deptName'
            },{
            	title:'操作',
            	dataIndex:'opers'
            },{
                title: '操作内容',
                dataIndex: 'descr',
               	formatter:{
               		length : 10
               	}
            },{
                title: 'IP地址',
                dataIndex: 'ip'
            },{
            	title:'时间',
            	dataIndex:'ctime'
            }
            ]
        });
        
    });
        
	$('#search-btn').click(function(){
    	var params = {};
    	params['searchUserName'] = $('#searchUserName').val();
    	params['searchDeptName'] = $('#searchDeptName').val();
    	params['searchOpers'] = $("#searchOpers").val();
    	params['searchDescr'] = $('#searchDescr').val();
    	params['searchIp'] = $('#searchIp').val();
    	grid.load(params);
    });
    
    $('#searchState').change(function(){
		$('#search-btn').click();
	})
</script>
</body>
</html>